#ifndef CSCREEN_H_INCLUDED
#define CSCREEN_H_INCLUDED

/**
 *
 * \file CScreen.h
 * \brief This file contains the CScreen class declaration.
 * \author Vladimir Klubkov (aka marked)
 *
 * Last changes date:
 * \date 13.03.2011
 *
 * Copyright 2011 Vladimir Klubkov <marked-one@yandex.ru>
 *
 * This file is part of OOXlib.
 *
 * OOXLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * OOXlib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OOXlib; if not, you can try to find  it here:
 * http://www.gnu.org/licenses/gpl.txt
 * or write to the Free Software Foundation, Inc., 59 Temple Place,
 * Suite 330, Boston, MA  02111-1307  USA
 *
 */

#include "CSingleScreenXServerConnection.h"

namespace OOXlib {

/**
 * \class CScreen
 * This class must be used for screen handling instead of simply using the screen number.
 */
class CScreen {
public:
    /**
     * \class CScreenNumberOutOfBoundsException
     * Exception handler class.
     */
    class CScreenNumberOutOfBoundsException : public CException {
    public:
        CScreenNumberOutOfBoundsException(const ::std::string &File, const int iLine, const ::std::string &Function);
    };
public:
// Constructors.
    CScreen(const CXServerConnection *pXServerConnection);
    CScreen(const CXServerConnection *pXServerConnection, const int iScreenNumber);
// Getters.
    operator int() const;
    int Get() const;
    int GetScreenNumber() const;
// Screen info.
    int ScreenWidth() const;
    int ScreenHeight() const;
private:
    const CXServerConnection *m_pXServerConnection;
    ::Screen *m_pScreen;
    int m_iScreenNumber;
    int m_iScreenWidth;
    int m_iScreenHeight;
};
/**
 * \class CNULLPtrScreenException
 * Exception handler class.
 */
class CNULLPtrScreenException : public CException {
public:
    CNULLPtrScreenException(const ::std::string &File, const int iLine, const ::std::string &Function);
};

} // OOXlib

#endif // CSCREEN_H_INCLUDED
